package com.alik.service;

import java.util.List;
import java.util.Map;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Isolation;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

import com.alik.dao.BaseDao;

@Service("userService")
@Transactional(readOnly = true)
public class UserService {
    
    @Resource(name = "userDao")
    private BaseDao userDao;
    
    public List<Map> selectUser(Map inMap) {
        return userDao.select(inMap);
    }
    
    @Transactional(isolation = Isolation.DEFAULT, readOnly = false, propagation = Propagation.REQUIRED)
    public void insert(Map inMap) {
        userDao.insert(inMap);
    }
    
    public BaseDao getUserDao() {
        return userDao;
    }
    
    public void setUserDao(BaseDao userDao) {
        this.userDao = userDao;
    }
    
}
